
*** CHANGE FILE PATH HERE ***
libname cms ".\raw\CMS";
libname input ".\raw";
%let outpath= ".\statadata"; RUN;

%include ".\dofile\SAS_DME_clean.sas";
%include ".\dofile\SAS_SleepApnea.sas";
%include ".\dofile\SAS_costsummary.sas";


* Output *;
PROC EXPORT DATA= hcpcs_list_matched OUTFILE= "&outpath\hcpcs_list_matched" DBMS=STATA REPLACE; RUN;
PROC EXPORT DATA= dme_total_matched OUTFILE= "&outpath\dme_total_matched" DBMS=STATA REPLACE; RUN;

PROC EXPORT DATA= diag_total OUTFILE= "&outpath\OSA_diag" DBMS=STATA REPLACE; RUN;
PROC EXPORT DATA= OSA_cost_sum OUTFILE= "&outpath\OSA_cost_sum" DBMS=STATA REPLACE; RUN;

PROC EXPORT DATA= mbsf_total OUTFILE= "&outpath\mbsf" DBMS=STATA REPLACE; RUN;
PROC EXPORT DATA= total_sumgeo_2010 OUTFILE= "&outpath\geo_sum_2010" DBMS=STATA REPLACE; RUN;


